package com.xinli.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinli.business.domain.TQuestionReplyComment;
import com.xinli.business.mapper.TQuestionReplyCommentMapper;
import com.xinli.business.service.ITQuestionReplyCommentService;
import com.xinli.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 问题回复评论Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-24
 */
@Service
public class TQuestionReplyCommentServiceImpl extends ServiceImpl<TQuestionReplyCommentMapper, TQuestionReplyComment>  implements ITQuestionReplyCommentService
{
    @Autowired
    private TQuestionReplyCommentMapper tQuestionReplyCommentMapper;

    /**
     * 查询问题回复评论
     *
     * @param id 问题回复评论主键
     * @return 问题回复评论
     */
    @Override
    public TQuestionReplyComment selectTQuestionReplyCommentById(String id)
    {
        return tQuestionReplyCommentMapper.selectTQuestionReplyCommentById(id);
    }

    /**
     * 查询问题回复评论列表
     *
     * @param tQuestionReplyComment 问题回复评论
     * @return 问题回复评论
     */
    @Override
    public List<TQuestionReplyComment> selectTQuestionReplyCommentList(TQuestionReplyComment tQuestionReplyComment)
    {
        return tQuestionReplyCommentMapper.selectTQuestionReplyCommentList(tQuestionReplyComment);
    }

    /**
     * 新增问题回复评论
     *
     * @param tQuestionReplyComment 问题回复评论
     * @return 结果
     */
    @Override
    public int insertTQuestionReplyComment(TQuestionReplyComment tQuestionReplyComment)
    {
                tQuestionReplyComment.setCreateTime(DateUtils.getNowDate());
            return tQuestionReplyCommentMapper.insertTQuestionReplyComment(tQuestionReplyComment);
    }

    /**
     * 修改问题回复评论
     *
     * @param tQuestionReplyComment 问题回复评论
     * @return 结果
     */
    @Override
    public int updateTQuestionReplyComment(TQuestionReplyComment tQuestionReplyComment)
    {
                tQuestionReplyComment.setUpdateTime(DateUtils.getNowDate());
        return tQuestionReplyCommentMapper.updateTQuestionReplyComment(tQuestionReplyComment);
    }

    /**
     * 批量删除问题回复评论
     *
     * @param ids 需要删除的问题回复评论主键
     * @return 结果
     */
    @Override
    public int deleteTQuestionReplyCommentByIds(String[] ids)
    {
        return tQuestionReplyCommentMapper.deleteTQuestionReplyCommentByIds(ids);
    }

    /**
     * 删除问题回复评论信息
     *
     * @param id 问题回复评论主键
     * @return 结果
     */
    @Override
    public int deleteTQuestionReplyCommentById(String id)
    {
        return tQuestionReplyCommentMapper.deleteTQuestionReplyCommentById(id);
    }
}
